package llc.ufwa.tasktesting;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class TaskTestingActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    	
        super.onCreate(savedInstanceState);
        
        setContentView(R.layout.main);
        
        final TextView title = (TextView) this.findViewById(R.id.title);
        
        title.setText("A");
        
        final Button buttonA = (Button) this.findViewById(R.id.a_button);
        
        buttonA.setOnClickListener(
            new OnClickListener() {
	
				@Override
				public void onClick(View arg0) {
				    TaskTestingActivity.this.startActivity(new Intent(TaskTestingActivity.this, TaskTestingActivity.class));
				}
		    }
        );
        
        final Button buttonB = (Button) this.findViewById(R.id.b_button);
        
        buttonB.setOnClickListener(
            new OnClickListener() {
	
				@Override
				public void onClick(View arg0) {
				    TaskTestingActivity.this.startActivity(new Intent(TaskTestingActivity.this, BActivity.class));
				}
		    }
        );
        
        final Button buttonC = (Button) this.findViewById(R.id.c_button);
        
        buttonC.setOnClickListener(
            new OnClickListener() {
	
				@Override
				public void onClick(View arg0) {
				    TaskTestingActivity.this.startActivity(new Intent(TaskTestingActivity.this, CActivity.class));
				}
		    }
        );
        
        final Button buttonD = (Button) this.findViewById(R.id.d_button);
        
        buttonD.setOnClickListener(
            new OnClickListener() {
	
				@Override
				public void onClick(View arg0) {
				    TaskTestingActivity.this.startActivity(new Intent(TaskTestingActivity.this, DActivity.class));
				}
		    }
        );
        
        final Button buttonE = (Button) this.findViewById(R.id.e_button);
        
        buttonE.setOnClickListener(
            new OnClickListener() {
	
				@Override
				public void onClick(View arg0) {
				    TaskTestingActivity.this.startActivity(new Intent(TaskTestingActivity.this, EActivity.class));
				}
		    }
        );
        
    }

	@Override
	protected void onResume() {
		super.onResume();
		
		TaskTestingActivity.this.startActivity(new Intent(TaskTestingActivity.this, BActivity.class));
        
        finish();
        
	}
    
    
}